package com.sudo.dao.admin.entity;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
@Data
@Table(name = "sys_user_behavior")
public class SysUserBehavior {
    /**
     * 乐观锁
     */
    @Id
    private Long id;

    /**
     * 用户账户
     */
    private String username;

    @Column(name = "role_code")
    private String roleCode;

    /**
     * 返回状态
     */
    @Column(name = "resp_status")
    private Integer respStatus = 0;

    /**
     * 客户IP
     */
    @Column(name = "client_ip")
    private String clientIp;

    private String country;

    private String province;

    private String city;

    /**
     * 操作事件
     */
    @Column(name = "oper_event")
    private String operEvent;

    /**
     * 访问路径
     */
    @Column(name = "req_url")
    private String reqUrl;

    /**
     * 操作方法
     */
    @Column(name = "oper_method")
    private String operMethod;

    /**
     * 请求类型
     */
    @Column(name = "req_type")
    private String reqType;

    /**
     * 查询参数
     */
    @Column(name = "req_param")
    private String reqParam;

    /**
     * 链路追踪ID
     */
    @Column(name = "trace_id")
    private String traceId;

    /**
     * 访问时间
     */
    @Column(name = "oper_time")
    private String operTime;
    /**
     * 请求耗时
     */
    @Column(name = "use_time")
    private Long useTime;


    public interface Filed{
        String id = "id";
        String username = "username";
        String roleCode = "roleCode";
        String respStatus = "respStatus";
        String clientIp = "clientIp";
        String country = "country";
        String province = "province";
        String city = "city";
        String operEvent = "operEvent";
        String reqUrl = "reqUrl";
        String operMethod = "operMethod";
        String reqType = "reqType";
        String reqParam = "reqParam";
        String traceId = "traceId";
        String operTime = "operTime";
        String useTime = "useTime";
    }
}
